<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="app" uri="http://www.wanrenhui.com" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	  <%@include file="/res/include/base-head.jsp"%>
	  <%@include file="/res/include/jquery-easyui.jsp"%>
	<script type="text/javascript" src="${pageContext.request.contextPath}/res/js/user/userMoneyLog.js"></script>
  </head>
  <body>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'north',border:false,split:false">
	    	<form id="query-form" class="search_form clearfix">
				<dl>    
	                <dt>用户名称：</dt>
	                <dd>
	                	<input name="userNick" id="userNick" type="text" class="txt" maxlength="16"/>
	                </dd>
	            </dl>
				<dl>
					<dt>交易类型：</dt>
					<dd>
						<select name="type" id="type" class="txt grid-8">
							<option value="">请选择</option>
							<option value="1">圈币</option>
							<option value="2">余额</option>
						</select>
					</dd>
				</dl>
				 <dl>
	            	<dt>时间：从</dt>
	                <dd>
		                <input name="searchBTimeStr" id="searchBTimeStr" type="text" class="txt easyui-datetimebox" maxlength="19"/> 到 
		                <input name="searchETimeStr" id="searchETimeStr" type="text" class="txt easyui-datetimebox" maxlength="19"/>
	                </dd>
	            </dl>
	            <p class="search_form_btn">
	            	<input type="button" value="搜索" class="icon_serach" onclick="admin.userMoneyLog.query()" />
	            </p>
	            <dl></dl>
	            <p class="search_form_btn">
	            	<input type="button" value="导出excel" class="icon_serach" onclick="admin.userMoneyLog.export2Excel()" />
	            </p>
	        </form>
	  	</div>
	    <div data-options="region:'center',border:false">
		    <table id="datagrid" data-options="url:'${pageContext.request.contextPath}/user/money/log/list',toolbar:'#toolbar'">
				<thead>
					<tr>
						<th data-options="field:'userNick',width:100,align:'center'">昵称</th>
						<th data-options="field:'money',width:300,align:'center' ">交易额(正数为入账,负数为出账)</th>
						<th data-options="field:'balance',width:300,align:'center' ">(交易后)余额</th>
						<th data-options="field:'remark',width:300,align:'center' ">交易备注</th>
						<th data-options="field:'type',width:100,align:'center',formatter:formatLogType">交易类型</th>
						<th data-options="field:'strNewAt',width:150,align:'center'">时间</th>
					</tr>
				</thead>
			</table>
	  	</div>
	</div>
	<script>
	function formatLogType(type){
		var l_html="余额";
		if(type==1){
			l_html = '圈币';
		}
		return l_html;
	}
	</script>
  </body>
</html>
